App({
  onLaunch: function () {
    if (!wx.cloud) {
      console.error('请使用 2.2.3 或以上的基础库以使用云能力');
    } else {
      wx.cloud.init({
        env: 'wc-classonline-8gxjkloi72faa797',
        traceUser: true,
      });
    }
    wx.getSystemInfo({
      success: res => {
        const ScreenHeight = res.screenHeight
        this.globalData.ScreenHeight = ScreenHeight
      }
    })
  },
  globalData: {
    ScreenHeight: 0,
    // avatar: "/image/user.png",
    // nickName: "请输入您的昵称"
  }
});
! function() {
  //获取页面配置并进行页面分享配置
  var PageTmp = Page
  Page = function(pageConfig) {
    let view = Page
    //全局开启分享
    pageConfig = Object.assign({
      onShareAppMessage: function() {
        return{
          title:'精彩课程，想看就看！',
          path:'/pages/launchpage/index',
          imageUrl:'https://kanekikeh.online/share1.png'
        }
      },
      onShareTimeline: function() {
        return{
          title:'精彩课程，想看就看！',
          path:'/pages/launchpage/index',
          imageUrl:'https://kanekikeh.online/share1.png'
        }
      }
    }, pageConfig);
    //3. 配置页面模板
    PageTmp(pageConfig);
  }
}();